package com.yingjia.yingjiauniversity.retrofit.api;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Path;

/**
 * Created by 张智轶 on 2016/10/13.
 */
public interface CommonApi {
    @GET("{path}")
    Call<ResponseBody> retrofitDownload(@Path(value = "path", encoded = true) String path);

    @Multipart
    @POST("{path}")
    Call<ResponseBody> retrofitUpload(@Path(value = "path", encoded = true) String path, @Part("fileName") String des,
                                      @PartMap Map<String, RequestBody> params);
}
